<?php

use yii\helpers\Html;
use kartik\daterange\DateRangePicker;
use yii\bootstrap\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\Topic */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="topic-form">

    <?php $form = ActiveForm::begin([
      'layout'=>'horizontal'
    ]);
    ?>

    <?= $form->field($model, 'topic_name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'topic_author',[
        'template' => '{label}'.$model->topic_author
    ]) ?>

    <?= $form->field($model, 'topic_des')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'topic_tags')->textInput(['maxlength' => true]) ?>
    <?= $form->field($model, 'updated_at')->label('更新时间')->textInput(['formart'=>'date','class'=>'sss'])  ?>


    <?= $form->field($model, 'created_at')->widget(DateRangePicker::ClassName(),[
        'hideInput'=>true,
        'pluginOptions'=>[
            'singleDatePicker'=>true,
        ]
    ]) ?>



    <?= $form->field($model, 'topic_node_index')->textInput() ?>
    <?= $form->field($model, 'topic_node_time')?>

    <?= $form->field($model, 'topic_viewcount')->textInput() ?>

    <?= $form->field($model, 'topic_comment_id')->textInput() ?>

    <?= $form->field($model, 'topic_recommend_id')->textInput() ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
